<%@ Page Language="C#" MasterPageFile="~/MuseumOwner.master" AutoEventWireup="true"
    CodeFile="ManageGame.aspx.cs" Inherits="ManageGame" Title="Manage Game" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="100%" cellspacing="0" cellpadding="0" border="0">
        <tr>
            <td colspan="3" align="center">
                <b style="font-size: x-large;">GAMES</b>
            </td>
        </tr>
        <tr>
            <td>
                <div id="divGridView">
                    <div id="divGames">
                        <asp:GridView ID="GridViewGames" runat="server" EnableViewState="False" Width="100%"
                            BorderWidth="1" CellPadding="4" ForeColor="#333333" GridLines="Both" AutoGenerateColumns="false"
                            DataKeyNames="GameID" AutoGenerateDeleteButton="false" EmptyDataText="No records found"
                            AllowPaging="true" AllowSorting="true" PageSize="10" AlternatingRowStyle-BackColor="White"
                            OnPageIndexChanging="gridView_PageIndexChanging" OnSorting="gridView_Sorting"
                            RowStyle-CssClass="record" OnRowDeleting="DeleteRecord">
                            <RowStyle CssClass="record"></RowStyle>
                            <HeaderStyle BackColor="#A59072" HorizontalAlign="Left" Font-Bold="True" ForeColor="White" />
                            <Columns>
                                <asp:BoundField DataField="GameID" HeaderText="ID" />
                                <asp:TemplateField HeaderText="Name">
                                    <ItemTemplate>
                                        <span id="PName<%# Eval("GameID") %>">
                                            <%# Eval("GameName")%></span>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField HeaderText="ALIAS" DataField="GameAlias" />
                                <asp:BoundField HeaderText="DESCRIPTION" DataField="GameDescription" />
                                <asp:BoundField HeaderText="PRICE" DataField="GamePrice" />
                                <asp:BoundField HeaderText="VERSION" DataField="GameVersion" />
                                <asp:BoundField HeaderText="DURATION" DataField="GameDuration" />
                                <asp:TemplateField HeaderText="EDIT">
                                    <ItemTemplate>
                                        <a href="GameDetails.aspx?PageMode=Edit&GameID=<%# Eval("GameID") %>" title="Edit">Edit</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="DELETE">
                                    <ItemTemplate>
                                        <%--<a href="#" id='<%# Eval("GameID") %>' class="delbutton">
                                        <img border="0" src="Images/delete.png" alt="Delete" /></a>--%>
                                        <span onclick="return confirm('Are you sure to Delete the record?')">
                                            <asp:LinkButton ID="lnkB" runat="Server" Text="Delete" CommandName="Delete"></asp:LinkButton>
                                        </span>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>
                    <%--<div id="divSchools">
                        <asp:GridView ID="GridViewSchools" runat="server" EnableViewState="False" Width="100%"
                            BorderWidth="1" CellPadding="4" ForeColor="#333333" GridLines="Both" AutoGenerateColumns="false"
                            DataKeyNames="SchoolID" AutoGenerateDeleteButton="false" EmptyDataText="No records found"
                            AllowPaging="true" AllowSorting="true" PageSize="10" AlternatingRowStyle-BackColor="White"
                            OnPageIndexChanging="gridView_PageIndexChanging" OnSorting="gridView_Sorting"
                            RowStyle-CssClass="record" OnRowDeleting="DeleteRecord">
                            <RowStyle CssClass="record"></RowStyle>
                            <HeaderStyle BackColor="#A59072" HorizontalAlign="Left" Font-Bold="True" ForeColor="White" />
                            <Columns>
                                <asp:BoundField DataField="SchoolID" HeaderText="ID" />
                                <asp:BoundField HeaderText="School Name" DataField="SchoolName" />
                                <asp:BoundField HeaderText="School Address" DataField="Address" />
                                <asp:BoundField HeaderText="Museum" DataField="MuseumName" />
                                <asp:TemplateField HeaderText="Edit">
                                    <ItemTemplate>
                                        <a href="SchoolDetails.aspx?PageMode=Edit&SchoolID=<%# Eval("SchoolID") %>" title="Edit">
                                            Edit</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Delete">
                                    <ItemTemplate>
                                        <span onclick="return confirm('Are you sure to Delete the record?')">
                                            <asp:LinkButton ID="lnkB" runat="Server" Text="Delete" CommandName="Delete"></asp:LinkButton>
                                        </span>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>--%>
                    <p>
                        <asp:Label ID="lblMessage" runat="server" EnableViewState="false" ForeColor="Red" />
                    </p>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
